include("shared.lua")
include("cl_heart.lua")

function GM:SpawnMenuOpen()
	return false	
end

function GM:ContextMenuOpen()
	return false	
end


local bDrawRect = true;
local function DrawBlack()
	if( bDrawRect )then
		draw.RoundedBox( 4, 0, 0, surface.ScreenWidth(), surface.ScreenHeight(), Color( 0, 0, 0, 255 ) );
	end
end
hook.Add( "HUDPaint", "HUD_TEST2", DrawBlack );


function ShowTeamMenu()
	local DermaPanel = vgui.Create( "DFrame" );
	DermaPanel:SetPos( 50,50 );
	DermaPanel:SetSize( 200, 301 );
	DermaPanel:SetTitle( "Choose Your Team" );
	DermaPanel:SetVisible( true )
	DermaPanel:SetDraggable( false );
	DermaPanel:ShowCloseButton( false );
	DermaPanel:MakePopup();
 
	local DermaButton = vgui.Create( "DButton", DermaPanel );
	DermaButton:SetText( "Human" );
	DermaButton:SetPos( 25, 50 );
	DermaButton:SetSize( 150, 50 );
	DermaButton.DoClick = function()
		RunConsoleCommand( "human" )
		DermaPanel:SetVisible( false )
		bDrawRect = false;
	end 
 
	local DermaButton = vgui.Create( "DButton", DermaPanel );
	DermaButton:SetText( "Ghost" );
	DermaButton:SetPos( 25, 100 );
	DermaButton:SetSize( 150, 50 );
	DermaButton.DoClick = function()
		RunConsoleCommand( "ghost" )
		DermaPanel:SetVisible( false )
		bDrawRect = false;
	end
end
usermessage.Hook( "cl_teammenu", ShowTeamMenu )
